package com.zcx.demo.controller;

import com.zcx.demo.entity.User;
import com.zcx.demo.service.UserService;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zcx
 * @Title 简单控制器
 * @date 2018年12月03日 14:31
 **/
@RestController
public class HelloController {

    private static final Logger logger = LogManager.getLogger(HelloController.class);

    @Autowired
    private UserService userService;

    @RequestMapping("/index")
    public String hello() {
        User user = userService.findById("0025fd66316f4d4cb6654929e2e96f62");
//        User user = userService.findByLocalId("1");
        System.out.println(user);
        return "index";
    }
}
